﻿#ifndef TOOLBARMEASURE_H
#define TOOLBARMEASURE_H

#include <QToolBar>
class DisplayWidget;

class ToolBarMeasure : public QToolBar
{
    Q_OBJECT
public:
    ToolBarMeasure(const QString &title, QWidget *parent = Q_NULLPTR);
    ToolBarMeasure(QWidget *parent = Q_NULLPTR);
    void attach(DisplayWidget *widget);
private:
    void uncheckAll();
    void initAction();

private slots:
    void upateDrawType(bool on);
private:
    QAction *actionSelect;
    QAction *actionLine;
    QAction *actionParallel;
    QAction *actionRCircle;
    QAction *actionLCircle;
    QAction *actionRect;
    QAction *actionCorner;
    QAction *actionPolyline;
    QAction *actionPolygon;
    QAction *actionPCircle;
    QAction *actionDots2Line;

    DisplayWidget *centerWidget;
};

#endif // TOOLBARMEASURE_H
